import QtQuick 2.0
import QtQuick.Controls

Component{
    id:cameraPage
    Item {
        id:cameraPageItem
        anchors.fill: background

        Rectangle{//设备界面上方返回键以及页面名称 添加设备按钮
            id:cameraTopBar
            width: parent.width
            height: parent.height / 10
            anchors.left: parent.left
            anchors.top: parent.top
            color:"transparent"
            Image{
                id:cameraPageReturnImg
                anchors.left: parent.left
                anchors.verticalCenter: parent.verticalCenter
                source: "qrc:/icon/icon/m_back.svg"
                MouseArea{
                    anchors.fill: parent
                    onClicked:{
                        rootStackView.pop(cameraPage)
                    }
                }
            }

            Text{
                anchors.left: cameraPageReturnImg.right
                anchors.verticalCenter: parent.verticalCenter
                text: "家庭安防"
                color: textColor
                font.pixelSize: 20
            }
        }

        Rectangle{//设备界面
            id:cameraMain
            width: parent.width
            height: parent.height / 10*7
            anchors.top: cameraTopBar.bottom
            color:"transparent"
            clip: true
            Rectangle{
                anchors.fill: parent
                anchors.centerIn: parent
                radius: 20
                color:"transparent"
                Rectangle{
                    anchors.fill: parent
                    anchors.margins: 20
                    anchors.centerIn: parent
                    radius: 20
                    color: btnColor
                    Rectangle{
                        width: parent.width
                        height: parent.height / 5
                        color:"transparent"
                        Text{
                            id:cameraPageText
                            text:"监控画面"
                            color:textColor
                            x:20
                        }
                    }
                    //画面
                    GridView{

                    }
                }
            }
        }

        Rectangle{//设备界面
            id:cameraBottomBar
            width: parent.width
            height: parent.height / 5
            anchors.top: cameraMain.bottom
            clip: true
            color:"blue"
        }
    }
}
